package com.talent.web.excel.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.write.merge.LoopMergeStrategy;
import com.talent.web.excel.GenderConverter;

import java.time.LocalDateTime;

/**
 * @ClassName：DataDemo
 * @Author: hszhou
 * @Date: 2024/11/16 11:33
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
public class DataDemo {

    @ExcelProperty(value = "逐渐",index = 1)
    @ColumnWidth(value = 255)
    private Long id;


    /**
     * 合并单元格
     * 什么样子的单元可以合并 列值相同就合并单元格
     *     @ContentLoopMerge(eachRow = 2)
     */


    @ExcelProperty(value = "性别",converter = GenderConverter.class,index = 3)

    private Integer sex;

    @ExcelProperty(value = "出生年月")
    @DateTimeFormat("yyyy-MM-dd")

    private LocalDateTime birthday;

    public Long getId() {


        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public LocalDateTime getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDateTime birthday) {
        this.birthday = birthday;
    }
}
